package com.online_mall.orders.controller;

import com.online_mall.orders.entity.Orders;
import com.online_mall.orders.service.OrdersService;
import com.online_mall.uitl.ResultFormat;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (Orders)表控制层
 *
 * @author makejava
 * @since 2025-09-02 15:03:23
 */
@RestController
@RequestMapping("orders")
public class OrdersController {
    /**
     * 服务对象
     */
    @Resource
    private OrdersService ordersService;

    @RequestMapping(value = "/queryAllOrders",method = RequestMethod.GET)
    public ResultFormat queryAllOrders(Orders orders){
        return ordersService.queryAll(orders);
    }


    @RequestMapping(value = "/deleteOrders",method = RequestMethod.GET)
    public ResultFormat deleteOrders(String ordersId){
        return ordersService.delete(ordersId);
    }
}

